package com.gamota.mobi.util;

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Environment;

public class Constants {
	
	public static final int APP_UPDATE_NOTIFICATION_ID = 150;
	public static final int EBOOK_UPDATE_NOTIFICATION_ID = 151;
	public static final int COMIC_UPDATE_NOTIFICATION_ID = 152;
	public static final int TOPUP_PAYPAL_REQUEST_CODE = 105;
	public static final int TOPUP_BANK_REQUEST_CODE = 100;
	
	public static final String DISPLAY_MESSAGE_ACTION = "com.gamota.mobi.pushnotifications.DISPLAY_MESSAGE";
	public static final String ANDROID_STORE = "android";
	public static final String STORE_KEY = "_store_";
	public static final String NEWSFEED_BANNER_PAGE = "newsfeed_window";
	public static final String SEARCH_BANNER_PAGE = "search_window";
	public static final String GIFT_BANNER_PAGE = "gift_window";
	public static final String ACTION_CANCEL_DOWNLOAD = "com.appstore.vn.CANCEL_DOWNLOAD";
	
	public static final String FB_FQL_URL = "https://graph.facebook.com/fql?q=";
	public static final String FB_FQL_QUERY = "SELECT user_id FROM url_like WHERE user_id=me() AND url=";
	
	public static final String PAYPAL_DATA = "paypal_data";
	public static final String TRANSACTION_ID_KEY = "trans_success";
	
	public static final String ACTION_LOGIN = "_login_";
	public static final String FB_EMAIL = "_Fb_email";
	public static final String FB_TOKEN = "_fb_token";
	public static final String GOOGLE_EMAIL = "_google_email";
	public static final String GOOGLE_TOKEN = "_google_token";
	public static final String EXTRA_EMAIL = "_extra_email";
	public static final String LOGIN_TYPE = "_login_type";
	public static final int LOGIN_RESULT = 9;
	public static final int UPDATE_REQUEST_CODE = 1;
	
	public static final String RESPONSE_TYPE_KEY = "response_type";
	public static final String CLIENT_ID_KEY = "client_id";
	public static final String CLIENT_SECRET_KEY = "client_secret";
	public static final String SCOPE_KEY = "scope";
	public static final String STATE_KEY = "state";
	public static final String LANG_KEY = "lang";
	public static String CALLBACK_URL_KEY = "redirect_uri";
	public static String SEARCH_TYPE = "seaerch_type";
	public static final String ENCODE = "UTF-8";
	public static final String REQUEST_TOKEN_KEY = "request_token";
	public static final String GRANT_TYPE_KEY = "grant_type";
	public static final String REFRESH_TOKEN_KEY = "refresh_token";
	
	public static final String PREVIOUS_SCREEN = "_prev_scr";
	public static final String AUTO_INSTALL = "_auto_ins";
	public static final String AD_TEXT = "marquee_text";
	public static final String AD_START_SCREEN = "start_screen";
	public static final String AD_START_SCREEN_URL = "start_screen_url";
	public static final String DISPLAY_START_BANNER = "display_banner";
	public static final String BANNER_CLICK_URL = "click_url_banner";
	public static final String BANNER_SPIN_SLUG = "appstorevnspingame";
	public static final String BANNER_FREE_TYM_SLUG = "gettymfrommetaps";
	
	public static final String PREF_ACCESSTOKEN = "_pref_access_token";
	//public static final String ACCESS_TOKEN = "_access_token";
	public static final String REFRESH_TOKEN = "_refresh_token";
	//public static final String EXPIRE = "_expire";
	public static final String COUNTRY_CODE = "_country_code";
	public static final String PREF_LOGIN = "_pref_login";
	public static final String LOGIN = "_login";
	
	public static final String KEY_REFERER = "_key_referer";
	
	public static final String APPSTOREVN_PC = "http://appstore.vn/android/details?id=";
	public static final String EBOOK_PC = "http://appstore.vn/ebook/home/app/";
	public static final String COMIC_PC = "http://appstore.vn/comic/home/app/";
	public static final String MOVIE_ROOT = "http://appstore.vn/f/";
	public static final String FORGOT_PASSWORD_URL = "https://id.appota.com/forgot_password";
	public static final String SDCARD_CACHE_DIR = Environment.getExternalStorageDirectory() + "/Android/data/";
	
	public static final String APPSTORE_BANNER = "applicationstore2013";
	public static final String GAMESTORE_BANNER = "gamestore2013";
	
	public static final String EVENT = "UI-action";
	public static final String INSTALL_EVENT = "Install";
	public static final String EVENT_ACTION = "button-click";
	
	public static final String DOWNLOAD_EVENT_CATEGORY = "Download";
	public static final String DOWNLOAD_COMPLETE_ACTION = "DownloadComplete";
	public static final String QUICK_DOWNLOAD_ACTION = "QuickDownload";
	public static final String LIST_DOWNLOAD_ACTION = "DownloadAtList";
	public static final String COLLECTION_DOWNLOAD_ACTION = "DownloadAtCollection";
	public static final String DOWNLOAD_COMPLETED = "CompleteDownload";
	public static final String BUY_EVENT_ACTION = "Buy";
	public static final String VIEW_EVENT_ACTION = "ViewDetails";
	public static final String VIEW_RECOMMEND_EVENT = "ViewRecommend";
	
	public static final String ACTION_RELOAD_USER = "com.gamota.mobi.reloaduser";
	
	public static final String SEARCH_EVENT_ACTION = "Search";
	
	public static final String DEALER_KEY_FILENAME = "dealer_key";
	public static final String KEY_CURRENT_STORE = "_current_store";
	public static final String IS_ROOTED = "_is_rooted";
	public static final String FACEBOOK_APP_ID = "475065535871710";
	public static final String FB_ACCESS_TOKEN_PREF = "_fb_token_";
	public static final String ACTION_CHANGE_STORE = "com.gamota.mobi.action.change_store";
	public static final String NEWS_URL = "http://appstore.vn/newsfeed/android";
	public static final String UPDATE_CLIENT = "android_gamota";

	public static final String CLIENT_KEY = "f6bcef37aed92ba35d8a3a26875b594704fc4780d";
	public static final String CLIENT_SECRET = "c0d8541f06d17e3d9062e79436a5ebea04fc4780d";
	
	public static final String USER_INFO_ENDPOINT = "https://api.appota.com/user/info?access_token=";
	public static final String USER_CREATE_SETTINGS_ENDPOINT = "https://api.appota.com/user/settings_create?access_token=";
	public static final String USER_UPDATE_SETTINGS_ENDPOINT = "https://api.appota.com/user/settings_update?access_token=";
	public static final String USER_LIST_SETTINGS_ENDPOINT = "https://api.appota.com/user/settings_list?access_token=";
	public static final String USER_DETAILS_SETTINGS_ENDPOINT = "https://api.appota.com/user/settings_detail?access_token=";
	public static final String USER_GET_GIFTBOX_LIST_ENDPOINT = "https://api.appota.com/user/get_gift_box_list?access_token=";
	public static final String USER_OPEN_GIFTBOX_ENDPOINT = "https://api.appota.com/user/open_gift_box?access_token=";
	public static final String USER_BUY_GIFTBOX_ENDPOINT = "https://api.appota.com/user/buy?access_token=";
	
	public static final String CONVERT_LINK_ENDPOINT = "https://api.appota.com/content/convert_link?access_token=";
	
	public static final String REPORT_INSTALL_ENDPOINT = "https://api.appota.com/client/report_install?access_token=";
	public static final String REPORT_GIFTBOX_ENDPOINT = "https://api.appota.com/client/report_giftbox?access_token=";
	
	public static final String REQUEST_TOKEN_ENDPOINT = "https://id.appota.com/app/request_token";
	public static final String ACCESS_TOKEN_ENDPOINT = "https://id.appota.com/app/access_token";
	public static final String LOGIN_ENDPOINT = "https://api.appota.com/user/login?access_token=";
	public static final String LOGOUT_ENDPOINT = "https://api.appota.com/user/logout?access_token=";
	public static final String REGISTER_ENDPOINT = "https://api.appota.com/user/register?access_token=";
	public static final String REFRESH_TOKEN_ENDPOINT = "https://id.appota.com/app/refresh_token";
	public static final String CATEGORY_ENDPOINT = "https://api.appota.com/content/categories?access_token=";
	public static final String APPLICATION_ENDPOINT = "https://api.appota.com/content/get_list?access_token=";
	public static final String DETAILS_ENDPOINT = "https://api.appota.com/content/detail?access_token=";
	public static final String COMMENTS_ENDPOINT = "https://api.appota.com/content/comments?access_token=";
	public static final String WRITE_COMMENT_ENDPOINT = "https://api.appota.com/content/comment?access_token=";
	public static final String RATING_ENDPOINT = "https://api.appota.com/content/rate?access_token=";
	public static final String DOWNLOAD_ENDPOINT = "https://api.appota.com/content/download?access_token=";
	public static final String REPORT_ENDPOINT = "https://api.appota.com/content/report?access_token=";
	public static final String TOPNEW_ENDPOINT = "https://api.appota.com/content/top_new?access_token=";
	public static final String TOPDOWNLOAD_ENDPOINT = "https://api.appota.com/content/top_download?access_token=";
	public static final String TOPVIEW_ENDPOINT = "https://api.appota.com/content/top_view?access_token=";
	public static final String TOPPAID_ENDPOINT = "https://api.appota.com/content/top_paid?access_token=";
	public static final String TOPFREE_ENDPOINT = "https://api.appota.com/content/top_free?access_token=";
	public static final String HOT_ENDPOINT = "https://api.appota.com/content/hot?access_token=";
	public static final String RECOMMEND_ENDPOINT = "https://api.appota.com/content/recommend?access_token=";
	public static final String PROMOTION_ENDPOINT = "https://api.appota.com/content/get_promotion?access_token=";
	public static final String GIFTCODE_ENDPOINT = "http://appstore.vn/i/api/giftcode_app/";
	public static final String HOT_KEYWORD_ENDPOINT = "https://api.appota.com/content/hot_keywords?access_token=";
	
	public static final String CHECK_REMAIN_GIFT_ENDPOINT = "https://api.appota.com/content/check_application_giftbox?access_token=";
	
	public static final String NEWSFEED_ENDPOINT = "http://api.appota.com/newsfeed/get_list?lang=en";
	public static final String FEED_DETAILS_ENDPOINT = "http://api.appota.com/newsfeed/get_detail?lang=en";
	public static final String CHECK_VERSION_BOUGHT_ENDPOINT = "https://api.appota.com/content/check_version_bought?access_token=";
	
	public static final String ADs_ENDPOINT = "https://api.appota.com/banner/get?access_token=";
	public static final String BANNER_ENDPOINT = "https://api.appota.com/banner/get_all?access_token=";
	public static final String SEARCH_ENDPOINT = "https://api.appota.com/content/search?access_token=";
	public static final String BUY_ENDPOINT = "https://api.appota.com/content/buy?access_token=";
	public static final String CHARGE_ENDPOINT = "https://api.appota.com/payment/charge?access_token=";
	public static final String UPDATE_ENDPOINT = "https://api.appota.com/content/updates?access_token=";
	public static final String CHECK_TOPUP_ENDPOINT = "https://api.appota.com/payment/topup?access_token=";
	public static final String ACTIVE_DEALER_ENDPOINT = "https://api.appota.com/dealer/active?access_token=";
	public static final String CHECK_UPDATE_ENDPOINT = "http://api.appota.com/client/check_update";
	public static final String EXCHANGE_TYM_ENDPOINT = "https://api.appota.com/user/convert_tym?access_token=";
	public static final String TYM_RATE_ENDPOINT = "https://api.appota.com/user/rate_tym?access_token=";
	public static final String TRANSACTION_ENDPOINT = "https://api.appota.com/user/transactions?access_token=";
	public static final String DOWNLOADED_ENDPOINT = "https://api.appota.com/user/downloaded_list?access_token=";
	public static final String NOTIFICATION_ENDPOINT = "https://api.appota.com/client/notification?access_token=";
	public static final String CHANGE_PASS_ENDPOINT = "https://api.appota.com/user/change_password?access_token=";
	
	public static final String FB_LOGIN_ENDPOINT = "https://api.appota.com/user/login_facebook?access_token=";
	public static final String FB_REGISTER_ENDPOINT = "https://api.appota.com/user/register_facebook?access_token=";
	public static final String LOGIN_GOOGLE_ENDPOINT = "https://api.appota.com/user/login_google?access_token=";
	public static final String REGISTER_GOOGLE_ENDPOINT = "https://api.appota.com/user/register_google?access_token=";
	
	public static final String CARD_TOPUP_ENDPOINT = "https://api.appota.com/payment/topup_card?access_token=";
	public static final String SMS_TOPUP_ENDPOINT = "https://api.appota.com/payment/topup_sms?access_token=";
	public static final String BANK_TOPUP_ENDPOINT = "https://api.appota.com/payment/topup_bank?access_token=";
	public static final String PAYPAL_TOPUP_ENDPOINT = "https://api.appota.com/payment/topup_paypal?access_token=";
	public static final String TOPUP_ENDPOINT = "https://api.appota.com/payment/topup?access_token=";
	public static final String WAP_CHARGING_ENDPOINT = "https://api.appota.com/payment/topup_wapcharging?access_token=";
	
	public static final String SUCCESS_URL = "https://api.appota.com/wap_test/success";
	public static final String ERROR_URL = "https://api.appota.com/wap_test/error";
	
	public static final String GAME_STATUS_ENDPOINT = "https://api.appota.com/user/game_status?access_token=";
	public static final String GAME_PLAY_ENDPOINT = "https://api.appota.com/user/game_play?access_token=";
	
	public static final String COLLECTION_GROUP_ENDPOINT = "https://api.appota.com/content/get_collection_group?access_token=";
	public static final String LEVEL2_COLLECTION_ENDPOINT = "https://api.appota.com/content/get_collection_list?access_token=";
	public static final String LEVEL3_COLLECTION_ENDPOINT = "https://api.appota.com/content/get_collection?access_token=";
	public static final String COLLECTION_CONTENT_ENDPOINT = "https://api.appota.com/content/get_collection_content?access_token=";
	
	public static final String DEFAULT_REDIRECT_URI = "http://localhost";
	public static final String GRANT_TYPE = "authorization_code";
	public static final String LANG = "en";
	public static final String STATE = "appota";
	public static final String RESPONSE_TYPE = "code";
	public static final String DEALER_SCOPE = "dealer";
	public static final String USER_INFO_SCOPE = "user.info";
	public static final String USER_EMAIL_SCOPE = "user.email";
	public static final String CONTENT_INFO_SCOPE = "content.info";
	public static final String CONTENT_COMMENT_SCOPE = "content.comment";
	public static final String USER_COMMENT_SCOPE = "user.comment";
	public static final String CONTENT_DOWNLOAD_SCOPE = "content.download";
	public static final String CONTENT_BUY_SCOPE = "content.buy";
	public static final String USER_CHARGE_SCOPE = "user.charge";
	public static final String USER_PAYMENT_SCOPE = "user.payment";
	public static final String INAPP_SCOPE = "inapp";
	
	public static final String PREF_USER_LOGIN_TOKEN = "pref_user_token";
	public static final String USER_TOKEN_KEY = "user_token_key";
	public static final String PREF_ACCESS_TOKEN_TEMP = "pref_access_token_temp";
	public static final String ACCESS_TOKEN_TEMP = "access_token_temp";
	public static final String REFRESH_TOKEN_TEMP = "refresh_token_temp";
	public static final String EXPIRE_TEMP = "expire_temp";
	public static final String PREF_WISHLIST = "pref_dll";
	public static final String DLL = "dll";
	
	public static final String PREF_DOWNLOADING = "pref_downloading";
	public static final String PREF_DOWNLOAD_QUEUE = "pref_download_queue";
	public static final String KEY_DOWNLOADING = "key_downloading";
	public static final String KEY_DOWNLOAD_QUEUE = "key_download_queue";
	public static final String PREF_APP_ID = "pref_app_id";
	public static final String KEY_APP_ID = "_app_id";
	public static final String SETTING_PREF = "__settings_pref";
	public static final String KEY_AUTO_UPDATE = "__settings_auto_update";
	public static final String KEY_AUTO_INSTALL = "__settings_auto_install";
	public static final String KEY_ALREADY_UPDATING = "__already_update";
	public static final String KEY_ALLOW_PUSH = "__allow_push";
	public static final String PREF_DEALER_KEY = "_pref_dealer";
	public static final String DEALER_KEY = "__dealer_key";
	
	public static final String SENDER_ID = "787730237419"; 
	 
    /**
     * Tag used on log messages.
     */
	public static final String TAG = "APPOTA";
 
	public static final String EXTRA_MESSAGE = "message";
    
    //public static final String deviceID = 
    public static final String deviceOSName = "Android";
    public static final String deviceOSVersion = Build.VERSION.RELEASE;
	public static final String NEWSFEED_ID = "newsfeed_id";
	public static final String NEWSFEED_TITLE = "newsfeed_title";
	public static final String NEWSFEED_IMAGE = "newsfeed_image";
	public static final String NEWSFEED_CAN_LIKE = "newsfeed_canlike";
	public static final String NEWSFEED_USER_LIKES = "newsfeed_userlikes";
	public static final String TOP = "_top_";
	public static final String NAV_POSITION = "_nav_def_pos";
	public static final String PACKAGE_NAME = "package_id";
	public static final String SLUG = "application_id";
	public static final String ITEM_INFO = "item";
	public static final String DOWNLOAD_ITEM = "download_item_";
	public static final String FROM = "from";
	public static final String COLLECTION_LIST_ID = "coll_list_id";
	public static final String COLLECTION_TITLE = "coll_title";
	public static final String CATEGORY_ID = "cate_id";
	public static final String CATEGORY_NAME = "cate_name";
	public static final String KEY_UPDATE_DATA = "update_data";
	public static final String KEY_IMAGE = "buy_image";
	public static final String KEY_NAME = "buy_name";
	public static final String KEY_AUTHOR = "buy_author";
	public static final String KEY_PRICE_1 = "buy_price1";
	public static final String KEY_PRICE_2 = "buy_price2";
	public static final String KEY_VERSION = "buy_version";
	public static final String KEY_SLUG = "buy_slug";
	public static final String DEFIN_TOKEN="01f7c0afa54eb8df0c3f77a58f99adf8052650c85";
	public static final String COLLECTION_COVER = "coll_cover";
	public static final String DOWNLOADED_TYPE = "downloaded_type";
	public static final String SEARCH_QUERY = "searhc_query";
	public static final String MOVIE_URL = "movie_url";
	public static final String MOVIE_TITLE = "movie_title";
	public static final String MOVIE_EPISODE = "movie_episode";
	public static final String MOVIE_PATH = "movie_path";
	public static final String GREEN_TYM = "green_tym";
	public static final String USER_NAME = "user_name";
	public static final String FB_POST_MESSAGE = "fb_post_msg";
	public static final String FB_FRIEND_TAGS = "fb_friends_tags";
	public static final String FB_USER_IDS = "fb_ids";
	public static final String FB_USER_NAMES = "fb_names";
	public static final String SHARE_PICTURE = "share_pic";
	public static final String SHARE_NAME = "share_name";
	public static final String SHARE_LINK = "share_link";
	public static final String SHARE_MESSAGE = "share_message";
	public static final String IMAGES = "screen_shots";
	public static final String IMAGE_POSITION = "img_pos";
	public static final String DOWNLOAD_ID = "download_id";
	public static final String BUY_TYM = "Buy TYM";
	public static final String BUY_TYM_SUCCESS = "Buy TYM success";
	public static final String BANK_PAYMENT_DATA = "bank_data";
	public static final String APPSTOREVN = "AppStoreVn";
	public static final int API = Integer.valueOf(android.os.Build.VERSION.SDK_INT);
	public static final String INSTALL_SUCCESS = "InstallSuccess";
	public static final String IS_MOVIE_PURCHASED = "is_purchased";
	public static final String MESSAGE = "msg";
	public static final String TUTOR_POS = "tutor_pos";
	public static final String IS_SHOW_START_BANNER = "show_banner";
	public static final String COLLECTIONS = "collections";
	public static final int LOGIN_GOOGLE_REQUEST_CODE = 98;
	public static final String KEY_EP = "veriosn_name";
	public static final int SPIN_REQUEST_CODE = 99;
	public static final String START_DOWNLOAD_ACTION = "StartDownload";
	public static final String DOWNLOAD_ALL_COLLECTION = "DownloadAllAtCollection";
	public static final String NEWSFEED_DOWNLOAD = "DownloadAtNewsFeed";
	public static final String GET_TORRENT_LINK_ENDPOINT = "https://api.appota.com/content/download?access_token=";
    /**
     * Notifies UI to display a message.
     * <p>
     * This method is defined in the common helper because it's used both by
     * the UI and the background service.
     *
     * @param context application's context.
     * @param message message to be displayed.
     */
    public static void displayMessage(Context context, String message) {
        Intent intent = new Intent(DISPLAY_MESSAGE_ACTION);
        intent.putExtra(EXTRA_MESSAGE, message);
        context.sendBroadcast(intent);
    }
    public static String DONT_SHOW_CONFIRM_SPIN_AGAIN ="_dont_show_confirm_spin";
}
